package com.jiyun.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiyun.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface PersonalMapper extends BaseMapper<DcDriver> {
    @Select("select * from dc_driver where tel=#{tel}")
    DcDriver findDriverByTel(String tel);

    @Select("select * from n_card ")
    List<NCard> findCardList();

    int updateAssetsQuan(String tel);

//    int updateTotalAssets(String tel, BigDecimal summoney);


    int updateCurrentWithdrawal(String tel, BigDecimal inputMoney);

    String insertNewWallet(String tel, Integer inputMoney);

    @Select("select * from dc_withdraw")
    List<DcWithdraw> findAllWithdraw();


    List<RiderQueue> findByOrderDate(LocalDate date);

    List<RiderQueue> findByDriverIdAndOrderDateBetween(Integer did, LocalDate date, LocalDate date1);

    List<RiderQueue> findTrend(Integer day, Integer num);

    @Select("select * from rider_queue rq where did=#{did}")
    List<RiderQueue> findAll(Integer did);

    BigDecimal zichanzonge(Integer did);

    BigDecimal dangyueshouru(Integer did);

    void updateSumMoney(BigDecimal withdrawMoney,String tel,Integer driverId);

    BigDecimal dangyuetixian(Integer driverId);

    void totalAssets(BigDecimal totalAssets, Integer id);



    void saveDriverPrice(Integer id, BigDecimal totalAssets);
}
